{include file="biz/biz_header.html"} 
<?php
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.core.js";
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.widget.js";
$this->_var['ucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.datepicker.js";

$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.core.js";
$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.widget.js";
$this->_var['cpucctojs'][] = $this->_var['TMPL_REAL']."/js/jquery.ui.datepicker.js";

$this->_var['ucctcss'][] = $this->_var['TMPL_REAL']."/css/datepicker.css";
?>

<script type="text/javascript" src="{function name="parse_script" v="$ucctojs" c="$cpucctojs"}"></script>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$ucctcss"}" />

{include file="biz/biz_nav.html"}
<div class="wrap clearfix wb biz-wrap">
{include file="biz/biz_info_header.html"}
<div class="biz_index_box clearfix">
	<div class="p10 clearfix">
		<style type="text/css">
			ul.commit_list{ padding:0px 10px;}
			ul.commit_list li{ padding:10px; display:block; }
			ul.commit_list li.gray{ background:#f2f2f2;}
		</style>
		
		
		<h3 class="modify-title">
			预订列表
		</h3>
		<div  style="padding:0 10px;">
			<form name="searchform" action="{url x="biz" r="ctorder"}" method="post">
			{$LANG.SUPPLIER_ORDER_SN}:<input type="text" class="f-input" name="order_sn"  size="16" value="{$order_sn}" />
			<select name="timetype">
				<option value="1" {if $smarty.request.timetype eq "1"}selected="selected"{/if}>预订时间</option>
				<option value="2" {if $smarty.request.timetype eq "2"}selected="selected"{/if}>下单时间</option>
			</select>
			<input type="text" name="begindate" id="uc_ct_begin_date" class="f-input" size="7" value="{$begindate}">
			至
			<input type="text" name="enddate" id="uc_ct_end_date" class="f-input" size="7" value="{$enddate}">
			手机号:<input type="text" class="f-input" size="9" name="order_tel" value="{$order_tel}" />
			类型{$smarty.request.timetype}: 
			<select name="deal_type">
					<option value="0" {if $deal_type eq 0}selected="selected"{/if}>所有</option>
					<option value="1" {if $deal_type eq 1}selected="selected"{/if}>餐厅</option>
					<option value="2" {if $deal_type eq 2}selected="selected"{/if}>KTV</option>
			</select>
				<input type="hidden" value="1" name="is_redirect" />
				<input type="submit" value="{$LANG.SEARCH}" class="formbutton" />
			</form>
		</div>
		<div class="blank5"></div>
		<table cellspacing="0" cellpadding="0" border="0" class="data-table">
			<tr>
				<th width="113">{$LANG.SUPPLIER_ORDER_SN}</th>
				<th width=96>预订时间</th>
				<th width=96>{$LANG.ORDER_CREATE_TIME}</th>
				<th width=75>联系人</th>
				<th width="76">联系电话</th>
				<th>订单状态</th>
				<th width="30">消费</th>
				<th width=24>{$LANG.VIEW}</th>
			</tr>
			{foreach from=$order_list item=order key=key}
			<tr {if $key mod 2 eq  1}class="gray"{/if}>
				<td style="text-align:left;">
					{$order.order_sn}											
				</td>
				<td>{function name="to_date" value=$order.order_time f="Y-m-d"} {function name="to_date" value=$order.order_time f="H:i"}</td>
				<td>{function name="to_date" value=$order.create_time f="Y-m-d"} {function name="to_date" value=$order.create_time f="H:i"}</td>
				<td>{$order.order_name} {if $order.order_sex eq 1}先生{else}女士{/if}</td>
				<td>{$order.order_tel}</td>
				<td>
					{if $order.status eq 0}
					等待处理
					{elseif $order.status eq 1}
					<span class="cg">等待{if $order.deal_type eq 1}K歌{else}就餐{/if}</span>
					{elseif $order.status eq 2}
					<span style="color:red">{if $order.deal_type eq 1}K歌{else}就餐{/if}到达</span>	
					{elseif $order.status eq 3}
					退订成功
					{elseif $order.status eq 4}
					订单失败{if $order.order_tip}<a href="javascript:void(0);" title="{$order.order_tip}" class="ml5 icons i005"></a>{/if}
					{/if}
				</td>
				<td style="text-align:center;">{if $order.order_money}{$order.order_money}{else}0{/if}</td>
				<td>
					<a href="{url x="biz"  r="ctorder#view" p="id=$order.id"}">{$LANG.VIEW}</a>
				</td>
			</tr>
			{/foreach}
	</table>
	</div>
	<div class="blank"></div>
	<div class="pages">{$pages}</div>
	<div class="blank"></div>
</div><!--end biz_index_box-->

</div>
<script type="text/javascript">
	$("#uc_ct_begin_date").datepicker({
		dateFormat: 'yy-mm-dd'
	});
	$("#uc_ct_end_date").datepicker({
		dateFormat: 'yy-mm-dd'
	});
</script>
{include file="biz/biz_footer.html"} 